<%@page import="org.apache.commons.lang3.StringUtils"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="user-index-head.jsp"%> 
<%
	String str = (String)request.getAttribute("ret");
	if(!StringUtils.isEmpty(str)){
		out.print("<script>alert('"+str+"');</script>");
	}
%>
 <link rel="stylesheet" href="<%=path%>/js/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="<%=path%>/js/kindeditor/plugins/code/prettify.css" />
<script src="<%=path%>/js/kindeditor/kindeditor.js" type="text/javascript"></script>
<script src="<%=path%>/js/kindeditor/lang/zh_CN.js" type="text/javascript"></script>
<script src="<%=path%>/js/kindeditor/plugins/code/prettify.js" type="text/javascript"></script>
<script>

var editor;
KindEditor.ready(function(K) {
editor = K.create('#info', {
resizeType : 1,
allowPreviewEmoticons : false,
allowImageUpload : false,
items : [
'source','undo','redo','copy','plainpaste','wordpaste','clearhtml','quickformat','selectall','fullscreen','fontname', 'fontsize','subscript','superscript','indent','outdent','|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline','hr',
'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
'insertunorderedlist', '|', 'emoticons', 'link', 'unlink','baidumap','lineheight','table','anchor','preview','print','template','code','cut']
});

});
</script>

<div class="content">
          <div class="cLineB"><h4>编辑图文自定义内容</h4><a href="javascript:history.go(-1);"  class="right btnGrayS vm" style="margin-top:-27px" >返回</a></div>
         
          <form method="post" action="<%=path%>/user/img!addTo.action"  enctype="multipart/form-data" >
         	<input type="hidden" value="${keyword.id}" name="keyword.id">
         	<input type="hidden" value="${keyword.img.id}" name="keyword.img.id">
          <div class="msgWrap form">
            <TABLE class="userinfoArea" border="0" cellSpacing="0" cellPadding="0" width="100%">
              <THEAD>
                <TR>
                  <TH style="width:120px" valign="top"><label for="keyword">关键词：</label></TH>
                  <TD><input type="input" class="px" id="keyword" value="${keyword.keyword }"  name="keyword.keyword" style="width:580px;"><br />
                  多个关键词请用空格格开：例如: 美丽&nbsp;漂亮&nbsp;好看 </TD>
                </TR>
                 <TR>
  <TH valign="top">关键词类型：</TH>
  <TD><label for="radio1">
  <input id="radio1" class="radio" type="radio" name="keyword.type" value="2"  checked="checked"    > 完全匹配  用户输入的和此关键词一样才会触发!</label><br /><label for="radio2">
  <input class="radio" id="radio2" type="radio" name="keyword.type" value="1"   > 包含匹配 (只要用户输入的文字包含本关键词就触发!v2用户才生效)</label></TD>
</TR>
              </THEAD>
              <TBODY>
               <TR>
                  <TH><span class="red">*</span><label for="title">标题：</label></TH>
                  <TD><input type="input" class="px" id="title" value="${keyword.img.title}"    name="keyword.img.title" style="width:580px;"> </TD>
                </TR>
                <TR>
                  <TH valign="top"><label for="text">简介：</label></TH>
                  <TD><textarea  class="px" id="Hfcontent"     name="keyword.img.info" style="width:580px;  height:100px">${keyword.img.info}</textarea><br />限制200字内

</TD>
                </TR>
                <TR>
                  <TH valign="top"><label for="classid">文章所属类别：</label></TH>
                  <TD>
                   <select name="keyword.img.classify.id">
                   <option value="">请选择分类</option>
                    <c:forEach items="${clist}" var="vo">
                      <option   value="${vo.id}" <c:if test="${keyword.img.classify.id==vo.id}"> selected="selected" </c:if>>${vo.name}</option>
                     </c:forEach>
                    </select><a href="<%=path%>/user/classify!add.do"  target="_self" >添加分类</a>
                  </TD>
                </TR>
               <!--   <TR>
                  <TH valign="top"><label for="picurl">封面图片：</label></TH>
                  <TD>（尺寸：宽720像素，高400像素） 小于500k;<div style="display:none">
                  <input name="upfile" type="file"  class="text textMiddle inputQ" value="请选择图片" />不上传不设置系统会自动随机分配</div></TD>
                </TR>-->
                
                          <TR>
                  <TH valign="top"><label for="pic">封面图片地址：</label></TH>
                  <TD><input class="text textMiddle inputQ"  name="keyword.img.picUrl" value="${keyword.img.picUrl}" style="width:580px;"  /><br />
                  推荐将图片上传到腾讯微薄再获取外链
</TD>
                </TR>
               <TR>
                  <TH valign="top"><label for="img.showpic">详细页是否显示封面：</label></TH>
                  <TD>是
                  <input class="radio" type="radio" name="keyword.img.showpic" value="1" <c:if test="${keyword.img.showpic=='true'}">  checked="checked" </c:if>  > 否
                  <input class="radio" type="radio" name="keyword.img.showpic" value="0"  <c:if test="${keyword.img.showpic=='false'}">  checked="checked" </c:if> >
                  
</TD>
                </TR>
                <TR>
                  <TH valign="top"><label for="info">图文详细页内容：</label></TH>
                  <TD><textarea name="keyword.img.content" id="info"  rows="5" style="width:590px;height:360px">${keyword.img.content }</textarea></TD>
                </TR>  
                 <TR>
                  <TH valign="top"><label for="url">图文外链网址：</label></TH>
                  <TD><input type="input" class="px" id="keyword.img.url" value="${keyword.img.url}" name="keyword.img.url" style="width:580px;"><br /><span class="red">如需跳转到其他网址，请在这里填写网址(例如：http://baidu.com，记住必须有http://)</span>如果填写了图文详细内容，这里请留空，不要设置！</TD>
                </TR>
                <TR>
                  <TH></TH>
                  <TD><input type="submit" value="保存" name="sbmt" class="btnGreen left">　<a href="<%=path%>/user/img!index.do"  class="btnGray vm">取消</a></TD>
                </TR>
              </TBODY>
            </TABLE>
            
          </div>
          </form>
          
        </div>     
 
        <div class="clr"></div>
      </div>
    </div>
  </div> 
<!--底部-->
  	</div>
<include file="Public:footer"/>